import React from 'react';
import ReactDOM from 'react-dom/client';
import { RouterProvider } from 'react-router-dom';
import router from './router';
import "@/assets/style/index.scss"
import "@/assets/font/font.css"
import { Provider } from "react-redux";
import store from "./store";
import intl from "react-intl-universal";
const locales = {
  "en-US": require("./locales/en-US.json"),
  "zh-CN": require("./locales/zh-CN.json"),
};
intl.init({
  warningHandler: (msg, detail) => {
    // 注意该函数开发环境有，打包后就没有了
    console.log(`${msg} ${detail}`);
  },
  currentLocale: localStorage.getItem("lang") || "en-US",
  locales,
});

const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
  <React.StrictMode>
    <Provider store={store}>
      <div style={{ marginTop: "80px" }}>
        <RouterProvider router={router}>
        </RouterProvider>
      </div>
    </Provider>
  </React.StrictMode>
);
